<template>
    <div class="area_simulation" @click="closeSelect">
        <div class="area_simulation_content" @click.stop="resetModal">
          <div class="radio_title">请选择区域</div>
          <div id="warp">
              <mt-radio
                align="right"
                v-model="areaValue"
                :options="areaList">
              </mt-radio>
            </div>
          <!--<div>{{areaValue}}</div>-->
        </div>
    </div>
</template>

<script>
  import  Vue from 'vue';
  import { Radio } from 'mint-ui';
  import BScroll from 'better-scroll';

  Vue.component(Radio.name, Radio);
  export default {
    props:{
      closeSelect:{
        type:Function
      },
      areaList:{
        type: Array
      }
    },
    name: 'AreaSimulation',
    data(){
      return{
        // areaValue:'',
        // resetModal:()=>{
        //
        // },
        better:null
      }
    },
    computed:{
      areaValue:{
        get(){
          return this.$store.getters.getAreaHouseRadio;
        },
        set(val){
          this.$store.commit('setAreaHouseRadio',val);
          this.closeSelect();
        }
      },
    },
    watch:{
      // areaValue(val){
      //   console.log(val);
      //   this.$store.commit('setAreaHouseRadio',val);
      // }
    },
    mounted(){
      let that = this;
      that.$nextTick(()=>{
        new BScroll('#warp',{
          click:true
        })
      })

    },
    methods:{
      resetModal(){

      },
      // testOne(){
      //   console.log(this.areaValue)
      // }
    }
  }
</script>

<style scoped>
/*.area_simulation{*/
  /*width: 100%;*/
  /*box-sizing: border-box;*/
  /*height: calc(100% - 50px);*/
  /*background-color: rgba(0,0,0,0.8);*/
  /*!*opacity: 0.5;*!*/
  /*position: fixed;*/
  /*left: 0;*/
  /*top: 50px;*/
  /*overflow: hidden;*/
  /*z-index: 1;*/
  /*padding: 30px 20px 0 20px;*/
/*}*/
  /*.area_simulation_content{*/
    /*z-index: 9999;*/
    /*position: absolute;*/
    /*width: calc(100% - 40px);*/
    /*background-color: white !important;*/
  /*}*/
  /*.radio_title{*/
    /*padding: 10px 10px 0 10px;*/
    /*color: #666666;*/
  /*}*/

</style>
